<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

<html>
  <head>
    <link href="css/style.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="bin/prototype.js"></script>
    <script type="text/javascript" src="bin/functions.js"></script>


    <title> LYON UNO </title>
  </head>

  <body>

    <div id="head_pic">
      <img src="images/title.png" alt="[LYON UNO]" id="picture">
    </div>

    <div id="webpage">

<?php
/*$host = "localhost";
$user = "ampersand";
$pass = "palomitas";
$dbname = "LYONUNO";*/

$hostDB = "localhost";
$userDB = "ampersand";
$passDB = "palomitas";
$dbnameDB = "LYONUNO";

$canalDB = mysql_connect($hostDB, $userDB, $passDB);
$db = mysql_select_db($dbnameDB);
$consulta = 'select nick,score from USERS order by score desc';

$resDB = mysql_db_query($dbnameDB, $consulta,$canalDB);

echo "<table border = 2>";
echo "<tr><td><h3>PLAYER</h3></td><td><h3>SCORE</h3></td></tr>";
while($row = mysql_fetch_object($resDB)){
	$nick = $row->nick;
	$score = $row->score;
	echo "<tr><td><b>" . $nick ."</b></td><td>" . $score . "</td></tr>";
}
echo "</table>";
mysql_free_result($resDB);
mysql_close($canalDB);
?>
<br>
<a href="main.php"> Back to the main page</a>
    </div>

    <div id="foot">
      <address>LYON UNO. CPE <br> 43, boulevard du 11 Novembre 1918. BP 2077 <br> 69616 Villeurbanne Cedex </address>
    </div>
  </body>
</html>
